<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>rem小测试</title>
    <style>
        html{
            font-size: 15px;
        }
        @media screen and (max-width: 500px)
        {
            html{
                font-size: 14px;
            }
        }
        .top{
            height: 3rem;
            background-color: aqua;
            font-size: 1rem;
            text-align: center;
            line-height: 3rem;
        }
        /* @media screen and (max-width: 600px) {
            .top{
                height: 4rem;
                font-size: 20px;
                line-height: 4rem;
            }
        } */
    </style>
</head>
<body>
    <div class="top">购物车</div>
</body>
</html>